/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.sql.Timestamp;
import java.io.Serializable;
import java.util.List;

/**
* @description /
* @author shitou
* @date 2024-08-15
**/
@Data
@TableName("studentqa")
public class Studentqa implements Serializable {

    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "teachId")
    private Integer teachId;

    @ApiModelProperty(value = "teachChapterId")
    private Integer teachChapterId;

    @ApiModelProperty(value = "teachSubsectionId")
    private Integer teachSubsectionId;

    @ApiModelProperty(value = "createUserId")
    private Integer createUserId;

    @TableField(exist = false)
    private String createName;

    @ApiModelProperty(value = "createTime")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty(value = "isOpen")
    private String isOpen;

    @ApiModelProperty(value = "content")
    private String content;

    @ApiModelProperty(value = "coordinate")
    private String coordinate;

    @ApiModelProperty(value = "noteContent")
    private String noteContent;

    @TableField(exist = false)
    private List<Studentqaresponse> studentqaresponseList;

    @TableField(exist = false)
    private String teachName;

    @TableField(exist = false)
    private String icon;

    public void copy(Studentqa source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
